const { getCustomers, addCustomer, updateCustomerById, delCustomerById,getCustomerById } = require('../dao/customersDao.js')

//获取所有客户
module.exports.getCustomers = async (params) => {
    const result = await getCustomers();
    return result
}

//通过id获取客户
module.exports.getCustomerById = async (params) => {
    const result = await getCustomerById(params);
    return result
}

//新增客户
module.exports.addCustomer = async (params) => {
    const result = await addCustomer(params);
    return result
}

//修改客户信息
module.exports.updateCustomerById = async (params) => {
    const result = await updateCustomerById(params);
    return result;
}

//删除客户
module.exports.delCustomerById = async (params) => {
    const result = await delCustomerById(params);
    return result;
}